import React from 'react';
const ChatMessage = ({ chat }) => {
  return (
    <div className={`message ${chat.role === "model"?'bot':'user'}-message ${chat.isError ?"error":""}`}>
      {chat.role ==="model"&& <span class="iconfont icon-bot"></span>}
      <p className="message-text">{chat.text}</p>

    </div>
  );
}
export default ChatMessage;